package day03;
import java.util.Scanner;
public class Tax {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		System.out.println("请输入你的税前工资金额:");
		double money = scan.nextDouble();
		System.out.println("请输入扣除的五险一金的金额:");
		double risks = scan.nextDouble();
		money = money - risks;
		if(money > 5000) {
			money = money - 5000;
			if(money <= 3000) {
				double tax = money * 0.03;
				System.out.println("你应该缴纳的个人所得税是:"+tax);
			}else if(money <= 12000) {
				double tax = money * 0.1 - 210;
				System.out.println("你应该缴纳的个人所得税是:"+tax);
			}else if(money <= 25000) {
				double tax = money * 0.2 - 1410;
				System.out.println("你应该缴纳的个人所得税是:"+tax);
			}else if(money <= 35000) {
				double tax = money * 0.25 - 2660;
				System.out.println("你应该缴纳的个人所得税是:"+tax);
			}else if(money <= 55000) {
				double tax = money * 0.3 - 4410;
				System.out.println("你应该缴纳的个人所得税是:"+tax);
			}else if(money <= 80000) {
				double tax = money * 0.35 - 7160;
				System.out.println("你应该缴纳的个人所得税是:"+tax);
			}else {
				double tax = money * 0.45 - 15160;
				System.out.println("你应该缴纳的个人所得税是:"+tax);
			}
		}else {
			System.out.println("你的工资太低,不够资格纳税");
		}
	}

}
